<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<div>
    <h2>Filebeat配置</h2>
</div>

<div class="textboxes">

    <div class="form-inline group-margin">
        <div class="form-group">
            <kendo-button class="k-primary" ng-click="query()">查询</kendo-button>
        </div>
    </div>
</div>

<script type="text/x-kendo-template" id="gridEditor">
    <div class=" textboxes">
        <!--<div class="k-edit-label"><label>项目名</label></div>-->
        <!--<div class="k-edit-field">-->
            <!--<input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"-->
                   <!--ng-model="dataItem.projectName"/>-->
        <!--</div>-->
        <div class="k-edit-label"><label>分区</label></div>
        <div class="k-edit-field">
            <input kendo-drop-down-list
                   id="partitionDropDownList"
                   k-data-source="partitions"
                   k-data-text-field="'partitionEname'"
                   k-data-value-field="'partitionEname'"
                   k-rebind="partitions"
                   k-on-change="dataItem.dirty=true"
                   ng-model="dataItem.partitionEname"/>
        </div>
        <div class="k-edit-label"><label>ip</label></div>
        <div class="k-edit-field">
            <input kendo-drop-down-list
                   k-data-text-field="'ip'"
                   k-data-value-field="'ip'"
                   k-cascade-from="'partitionDropDownList'"
                   k-cascade-from-field="'partitionEname'"
                   k-data-source="ips"
                   k-rebind="ips"
                   k-on-change="dataItem.dirty=true"
                   ng-model="dataItem.ip"/>
        </div>
        <div class="k-edit-label"><label>端口</label></div>
        <div class="k-edit-field">
            <input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"
                   ng-model="dataItem.port"/>
        </div>
        <div class="k-edit-label"><label>用户名</label></div>
        <div class="k-edit-field">
            <input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"
                   ng-model="dataItem.username"/>
        </div>
        <div class="k-edit-label"><label>密码</label></div>
        <div class="k-edit-field">
            <input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"
                   ng-model="dataItem.password"/>
        </div>
        <div class="k-edit-label"><label>中间件类型</label></div>
        <div class="k-edit-field">
            <input kendo-drop-down-list
                   k-data-source="middlewares"
                   k-data-text-field="'middlewareText'"
                   k-data-value-field="'middleware'"
                   k-rebind="middlewares"
                   k-on-change="dataItem.dirty=true"
                   ng-model="dataItem.middleware"/>
        </div>
        <div class="k-edit-label"><label>数据库类型</label></div>
        <div class="k-edit-field">
            <input kendo-drop-down-list
                   k-data-source="serverDBs"
                   k-data-text-field="'serverDBText'"
                   k-data-value-field="'serverDB'"
                   k-rebind="serverDBs"
                   k-on-change="dataItem.dirty=true"
                   ng-model="dataItem.serverDB"/>
        </div>
        <div class="k-edit-label"><label>xcom版本</label></div>
        <div class="k-edit-field">
            <input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"
                   ng-model="dataItem.xcomVersion"/>
        </div>
        <div class="k-edit-label"><label>redis主机地址</label></div>
        <div class="k-edit-field">
            <input type="text" required k-on-change="dataItem.dirty=true" class="k-input k-textbox"
                   ng-model="dataItem.redisHost"/>
        </div>
    </div>

</script>

<div class="table-responsive">
    <div kendo-grid="grid"
         k-column-menu="true"
         k-sortable="true"
         k-resizable="true"
         k-navigatable="true"
         k-pageable="pageable"
         k-filterable="true"
         k-editable="editable"
         k-selectable="'row'"
         k-toolbar="toolbar"
         k-columns="columns"
         k-data-source="dataSource"
         k-on-change="gridRowClick({ selected: selected },data,dataItem,angularDataItem)">

    </div>
</div>
